package com.hb.trade.server.project.section.service.raw;

import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hb.core.pojo.project.section.dto.BidDownRecordDTO;
import com.hb.core.pojo.project.section.entity.BidDownRecord;

import java.util.List;

/**
 * <p>
 * 供应商招标文件下载记录表 服务类
 * </p>
 *
 * @author zhongdl
 * @since 2021-12-31
 */
public interface BidDownRecordService extends IService<BidDownRecord> {
    /**
     *
     * @Description:
     * @Author: zhongdl
     * @Date:2022/1/4 15:24
     * @param sectionId:  标段id
     * @param bidderId: 投标人id
     * @param orgId: 企业id
     * @return: {@link java.lang.Boolean }
     **/
    Boolean downFlag(Long sectionId, Long bidderId, Long orgId);

    /**
     *
     * @Description: 查询当前标段是否下载了
     * @Author: zhongdl
     * @Date:2022/3/14 10:36
     * @param sectionId:
     * @param bidderId:
     * @param orgId:
     * @return: {@link BidDownRecord }
     **/
    BidDownRecord getBidDownRecord(Long sectionId, Long bidderId, Long orgId);


    /**
     * Description: 根据企业id和标段id查询招标文件下载列表
     * @author: fengbin
     * @date: 2022/2/28 16:25
     * @param orgId
     * @param sectionId
     @return: java.util.List<com.hb.core.pojo.project.section.entity.BidSection>
     */
    BidDownRecord findBidDownRecordInfoByOrgId(Long orgId , Long sectionId );

    /**
     *
     * @param pages
     * @param sectionId
     */
    Page<JSONObject> pageDownloadRecords(Page<JSONObject> pages, Long sectionId);


    /**
     * 查询标段的下载记录
     *
     * @author tian
     * @date 2022-5-10 14:03
     * @param sectionId
     * @return java.util.List<com.hb.core.pojo.project.section.dto.BidDownRecordDTO>
     */
    List<JSONObject> listDownloadBySectionId(Long sectionId);
}
